<include file="Public/header"/>
<div class="x-nav">
      <span class="layui-breadcrumb">

      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">


    <form class="layui-form" action="{:U('update')}" method="post">
        <div class="layui-form-item">
            <label for="name" class="layui-form-label">
                <span class="x-red">*</span>公告标题
            </label>

            <div class="layui-input-inline">
                <input type="text" id="title" name="title" required="" lay-verify="required"
                       autocomplete="off" value="{$data['title']}" class="layui-input">
            </div>
            <input type="hidden" name="id" value="{$data['id']}">
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>

        <div class="layui-form-item">
            <label for="name" class="layui-form-label">
                <span class="x-red">*</span>排序
            </label>

            <div class="layui-input-inline">
                <input type="number" id="sort" name="sort" required="" lay-verify="required"
                       autocomplete="off" value="{$data['sort']|default=0}" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>


        <div class="layui-form-item">
            <label for="price" class="layui-form-label">
                <span class="x-red"></span>公告内容
            </label>
            <div class="layui-input-inline">
                <textarea name="content"  style="width:600px;height:200px;">{$data['content']}</textarea>

            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button  class="layui-btn" lay-filter="submit" lay-submit="submit">
                保存
            </button>
        </div>
    </form>
</div>
<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-min.js?v=201706261"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<script>


    // var editor = KindEditor.create('textarea[name="content"]', {
    //     uploadJson: '__PUBLIC__/kindeditor/php/upload_json.php',
    //    // uploadJson: '{:U("Upload/saveimg_kind")}',
    //     fileManagerJson: '__PUBLIC__/kindeditor/php/file_manager_json.php',
    //     allowFileManager: false,
    //     items : ['source','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'emoticons', 'image'],
    //     afterBlur: function () {
    //         this.sync();
    //     }
    // });

    layui.use(['form','layer','upload'], function(){
        $ = layui.jquery;
        var form = layui.form
            ,layer = layui.layer;
        var upload = layui.upload;







    });
</script>
<include file="Public/footer"/>